diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 7820895..57b6896 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -40,6 +40,7 @@
 COBJS-$(CONFIG_PCI) += pci.o
 COBJS-$(CONFIG_PCI) += pci_type1.o
 COBJS-$(CONFIG_SYS_X86_REALMODE)	+= realmode.o
+COBJS-y	+= relocate.o
 COBJS-y	+= string.o
 COBJS-$(CONFIG_SYS_X86_ISR_TIMER)	+= timer.o
 COBJS-$(CONFIG_VIDEO)	+= video_bios.o
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
index 416aa9e..bebb347 100644
--- a/arch/x86/lib/board.c
+++ b/arch/x86/lib/board.c
@@ -41,7 +41,6 @@
 #include <ide.h>
 #include <serial.h>
 #include <asm/u-boot-x86.h>
-#include <elf.h>
 #include <asm/processor.h>
 
 #ifdef CONFIG_BITBANGMII
@@ -117,9 +116,6 @@
 typedef int (init_fnc_t) (void);
 
 static int calculate_relocation_address(void);
-static int copy_uboot_to_ram(void);
-static int clear_bss(void);
-static int do_elf_reloc_fixups(void);
 static int copy_gd_to_ram(void);
 
 init_fnc_t *init_sequence_f[] = {
@@ -183,59 +179,6 @@
 	return 0;
 }
 
-static int copy_uboot_to_ram(void)
-{
-	size_t len = (size_t)&__data_end - (size_t)&__text_start;
-
-	memcpy((void *)gd->relocaddr, (void *)&__text_start, len);
-
-	return 0;
-}
-
-static int clear_bss(void)
-{
-	ulong dst_addr = (ulong)&__bss_start + gd->reloc_off;
-	size_t len = (size_t)&__bss_end - (size_t)&__bss_start;
-
-	memset((void *)dst_addr, 0x00, len);
-
-	return 0;
-}
-
-static int do_elf_reloc_fixups(void)
-{
-	Elf32_Rel *re_src = (Elf32_Rel *)(&__rel_dyn_start);
-	Elf32_Rel *re_end = (Elf32_Rel *)(&__rel_dyn_end);
-
-	Elf32_Addr *offset_ptr_rom;
-	Elf32_Addr *offset_ptr_ram;
-
-	/* The size of the region of u-boot that runs out of RAM. */
-	uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;
-
-	do {
-		/* Get the location from the relocation entry */
-		offset_ptr_rom = (Elf32_Addr *)re_src->r_offset;
-
-		/* Check that the location of the relocation is in .text */
-		if (offset_ptr_rom >= (Elf32_Addr *)CONFIG_SYS_TEXT_BASE) {
-
-			/* Switch to the in-RAM version */
-			offset_ptr_ram = (Elf32_Addr *)((ulong)offset_ptr_rom +
-							gd->reloc_off);
-
-			/* Check that the target points into .text */
-			if (*offset_ptr_ram >= CONFIG_SYS_TEXT_BASE &&
-					*offset_ptr_ram <
-					(CONFIG_SYS_TEXT_BASE + size)) {
-				*offset_ptr_ram += gd->reloc_off;
-			}
-		}
-	} while (re_src++ < re_end);
-
-	return 0;
-}
-
 /* Load U-Boot into RAM, initialize BSS, perform relocation adjustments */
 void board_init_f(ulong boot_flags)
 {
@@ -270,17 +213,9 @@
 	if (init_cache() != 0)
 		hang();
 
-	copy_uboot_to_ram();
-	clear_bss();
-	do_elf_reloc_fixups();
+	relocate_code(0, gd, 0);
 
-	/*
-	 * Transfer execution from Flash to RAM by calculating the address
-	 * of the in-RAM copy of board_init_r() and calling it
-	 */
-	(board_init_r + gd->reloc_off)(gd, gd->relocaddr);
-
-	/* NOTREACHED - board_init_r() does not return */
+	/* NOTREACHED - relocate_code() does not return */
 	while (1)
 		;
 }
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c
new file mode 100644
index 0000000..badb5f8
--- /dev/null
+++ b/arch/x86/lib/relocate.c
@@ -0,0 +1,115 @@
+/*
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
+ * (C) Copyright 2002
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
+ *
+ * (C) Copyright 2002
+ * Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
+ *
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+ * Marius Groeger <mgroeger@sysgo.de>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <asm/u-boot-x86.h>
+#include <elf.h>
+
+static int copy_uboot_to_ram(void);
+static int clear_bss(void);
+static int do_elf_reloc_fixups(void);
+
+static int copy_uboot_to_ram(void)
+{
+	size_t len = (size_t)&__data_end - (size_t)&__text_start;
+
+	memcpy((void *)gd->relocaddr, (void *)&__text_start, len);
+
+	return 0;
+}
+
+static int clear_bss(void)
+{
+	ulong dst_addr = (ulong)&__bss_start + gd->reloc_off;
+	size_t len = (size_t)&__bss_end - (size_t)&__bss_start;
+
+	memset((void *)dst_addr, 0x00, len);
+
+	return 0;
+}
+
+static int do_elf_reloc_fixups(void)
+{
+	Elf32_Rel *re_src = (Elf32_Rel *)(&__rel_dyn_start);
+	Elf32_Rel *re_end = (Elf32_Rel *)(&__rel_dyn_end);
+
+	Elf32_Addr *offset_ptr_rom;
+	Elf32_Addr *offset_ptr_ram;
+
+	/* The size of the region of u-boot that runs out of RAM. */
+	uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;
+
+	do {
+		/* Get the location from the relocation entry */
+		offset_ptr_rom = (Elf32_Addr *)re_src->r_offset;
+
+		/* Check that the location of the relocation is in .text */
+		if (offset_ptr_rom >= (Elf32_Addr *)CONFIG_SYS_TEXT_BASE) {
+
+			/* Switch to the in-RAM version */
+			offset_ptr_ram = (Elf32_Addr *)((ulong)offset_ptr_rom +
+							gd->reloc_off);
+
+			/* Check that the target points into .text */
+			if (*offset_ptr_ram >= CONFIG_SYS_TEXT_BASE &&
+					*offset_ptr_ram <
+					(CONFIG_SYS_TEXT_BASE + size)) {
+				*offset_ptr_ram += gd->reloc_off;
+			}
+		}
+	} while (re_src++ < re_end);
+
+	return 0;
+}
+
+void relocate_code(ulong dummy_1, gd_t *id, ulong dummy_2)
+{
+	/*
+	 * Copy U-Boot into RAM, clear the BSS and perform relocation
+	 * adjustments
+	 */
+	copy_uboot_to_ram();
+	clear_bss();
+	do_elf_reloc_fixups();
+
+	/*
+	 * Transfer execution from Flash to RAM by calculating the address
+	 * of the in-RAM copy of board_init_r() and calling it
+	 */
+	(board_init_r + gd->reloc_off)(gd, gd->relocaddr);
+
+	/* NOTREACHED - board_init_r() does not return */
+	while (1)
+		;
+}
